package com.bjpowernode.learnmongodb.entity;

import lombok.Builder;
import lombok.Data;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@Data
@Builder
@Document("user")//指定集合名称
public class User {

    @Id
    private ObjectId id;
    private String name;
    private Integer age;
    private Date createDate;
}
